Skip to content

[libc++] Simplify the apple-system-hardened CI configuration #126911

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Feb 12, 2025

Conversation

ldionne
Copy link
Member

@ldionne ldionne commented Feb 12, 2025

It was basically a copy-paste of the non-hardened version of the same job, and it's easy to remove the duplication.

It was basically a copy-paste of the non-hardened version of the
same job, and it's easy to remove the duplication.
@ldionne ldionne requested a review from a team as a code owner February 12, 2025 13:37
@llvmbot llvmbot added the libc++ libc++ C++ Standard Library. Not GNU libstdc++. Not libc++abi. label Feb 12, 2025
@llvmbot
Copy link
Member

llvmbot commented Feb 12, 2025

@llvm/pr-subscribers-libcxx

Author: Louis Dionne (ldionne)

Changes

It was basically a copy-paste of the non-hardened version of the same job, and it's easy to remove the duplication.


Full diff: https://github.com/llvm/llvm-project/pull/126911.diff

1 Files Affected:

  • (modified) libcxx/utils/ci/run-buildbot (+4-48)
diff --git a/libcxx/utils/ci/run-buildbot b/libcxx/utils/ci/run-buildbot
index f1ede6474eb9e..0ee5bf3e71f59 100755
--- a/libcxx/utils/ci/run-buildbot
+++ b/libcxx/utils/ci/run-buildbot
@@ -548,59 +548,15 @@ apple-configuration)
     # TODO: It would be better to run the tests against the fake-installed version of libc++ instead
     xcrun --sdk macosx ninja -vC "${BUILD_DIR}/${arch}" check-cxx check-cxxabi check-cxx-abilist
 ;;
-apple-system-hardened)
-    clean
-
-    arch="$(uname -m)"
-    version="$(sw_vers --productVersion)"
-    params="target_triple=${arch}-apple-macosx${version}"
-    params+=";hardening_mode=fast"
-
-    # In the Apple system configuration, we build libc++ and libunwind separately.
-    step "Installing libc++ and libc++abi in Apple-system configuration"
-    ${CMAKE} \
-        -S "${MONOREPO_ROOT}/runtimes" \
-        -B "${BUILD_DIR}/cxx" \
-        -GNinja -DCMAKE_MAKE_PROGRAM="${NINJA}" \
-        -DCMAKE_BUILD_TYPE=RelWithDebInfo \
-        -DCMAKE_INSTALL_PREFIX="${INSTALL_DIR}/cxx" \
-        -DLLVM_LIT_ARGS="-sv --xunit-xml-output test-results.xml --timeout=1500 --time-tests" \
-        -DLLVM_ENABLE_RUNTIMES="libcxx;libcxxabi" \
-        -DLIBCXX_CXX_ABI=libcxxabi \
-        -C "${MONOREPO_ROOT}/libcxx/cmake/caches/Apple.cmake" \
-        -DLIBCXX_TEST_CONFIG="apple-libc++-system.cfg.in" \
-        -DLIBCXXABI_TEST_CONFIG="apple-libc++abi-system.cfg.in" \
-        -DLIBCXX_TEST_PARAMS="${params}" \
-        -DLIBCXXABI_TEST_PARAMS="${params}"
-
-    step "Installing libunwind in Apple-system configuration"
-    ${CMAKE} \
-        -S "${MONOREPO_ROOT}/runtimes" \
-        -B "${BUILD_DIR}/unwind" \
-        -GNinja -DCMAKE_MAKE_PROGRAM="${NINJA}" \
-        -DCMAKE_BUILD_TYPE=RelWithDebInfo \
-        -DCMAKE_INSTALL_PREFIX="${INSTALL_DIR}/unwind" \
-        -DLLVM_LIT_ARGS="-sv --xunit-xml-output test-results.xml --timeout=1500 --time-tests" \
-        -DLLVM_ENABLE_RUNTIMES="libunwind" \
-        -DLIBUNWIND_TEST_CONFIG="apple-libunwind-system.cfg.in" \
-        -DLIBUNWIND_TEST_PARAMS="${params}" \
-        -DCMAKE_INSTALL_NAME_DIR="/usr/lib/system"
-
-    step "Running the libc++ tests"
-    ${NINJA} -vC "${BUILD_DIR}/cxx" check-cxx
-
-    step "Running the libc++abi tests"
-    ${NINJA} -vC "${BUILD_DIR}/cxx" check-cxxabi
-
-    step "Running the libunwind tests"
-    ${NINJA} -vC "${BUILD_DIR}/unwind" check-unwind
-;;
-apple-system)
+apple-system|apple-system-hardened)
     clean
 
     arch="$(uname -m)"
     version="$(sw_vers --productVersion)"
     params="target_triple=${arch}-apple-macosx${version}"
+    if [[ "${BUILDER}" == *-hardened ]]; then
+        params+=";hardening_mode=fast"
+    fi
 
     # In the Apple system configuration, we build libc++ and libunwind separately.
     step "Installing libc++ and libc++abi in Apple-system configuration"

@ldionne ldionne added the pending-ci Merging the PR is only pending completion of CI label Feb 12, 2025
@ldionne ldionne merged commit 5953e5a into llvm:main Feb 12, 2025
82 checks passed
@ldionne ldionne deleted the review/simplify-apple-run-buildbot branch February 12, 2025 22:58
flovent pushed a commit to flovent/llvm-project that referenced this pull request Feb 13, 2025
…6911)

It was basically a copy-paste of the non-hardened version of the same
job, and it's easy to remove the duplication.
joaosaffran pushed a commit to joaosaffran/llvm-project that referenced this pull request Feb 14, 2025
…6911)

It was basically a copy-paste of the non-hardened version of the same
job, and it's easy to remove the duplication.
sivan-shani pushed a commit to sivan-shani/llvm-project that referenced this pull request Feb 24, 2025
…6911)

It was basically a copy-paste of the non-hardened version of the same
job, and it's easy to remove the duplication.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
libc++ libc++ C++ Standard Library. Not GNU libstdc++. Not libc++abi. pending-ci Merging the PR is only pending completion of CI
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants